﻿/*
 * KRPCOperationAttribute
 * 
 * Author: snowdreamit
 * Date: 2011/11/24
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BitTorrentSharp.KRPC
{
    /// <summary>
    /// Method type
    /// </summary>
    public enum MethodType
    {
        Synchronization,
        // Not support at present
        BeginAsynchronization,
        // Not support at present
        EndAsynchronization,
        // Not support at present
        CancelAsynchronization
    }

    /// <summary>
    /// KRPC Operation
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    public class KRPCOperationContractAttribute : Attribute
    {
        /// <summary>
        /// Name
        /// </summary>
        public string MethodName { get; set; }
        /// <summary>
        /// Is one way or not
        /// </summary>
        public bool IsOneWay { get; set; }
        /// <summary>
        /// Method type
        /// </summary>
        public MethodType Type { get; set; }
    }
}
